#ifndef _CGRENADE_H_
#define _CGRENADE_H_

#include "CBase.h"

class CGrenade : public CBase
{
private:
	int m_nGrenadeType;

	// Asset IDs
	int m_nExExplodeID;
	int m_nExGrenID;

	// Explosion rects
	RECT m_rExRadius;

	// Timer before explosion
	float m_fExpTimer;

	float m_fDestroyTimer;

	// Is the grenade exploding?
	bool m_bIsExploding;
public:
	enum grenType { EX_GRENADE, FW_GRENADE };

	CGrenade(void);
	~CGrenade(void);

	RECT GetExRadius() { return m_rExRadius; }
	bool GetExploding() { return m_bIsExploding; }

	int GetGrenadeType() { return m_nGrenadeType; }
	void SetGrenadeType(int nType) { m_nGrenadeType = nType; }

	void Update(float fElapsedTime);
	void Render(void);

	RECT GetCollisionRect(void);

	bool CheckCollision(IBaseInterface* pBase);
};

#endif